<%@page import="pl.org.waff.WaffServlet"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="applicationprefix" class="java.lang.String" scope="application" />
<jsp:useBean id="multiswitch" class="pl.org.waff.MultiSwitch" scope="session" />
<jsp:useBean id="waffuser" class="pl.org.waff.WaffUser" scope="session" />

<div id="debuginfo">
    &COPY; 2011 by Grzegorz Skorupa&nbsp;&vert;&nbsp;
    <%
        String currentPath = WaffServlet.getCurrentPath((String) request.getAttribute(WaffServlet.PATH_ATTRIBUTE_NAME));
        if ("y".equalsIgnoreCase(multiswitch.getDebugVisible())) {
    %>
    <a href="multiswitch.do?debugVisible=n">hide debug info</a>&nbsp;&vert;
    <table border="1" cellspacing="0">
        <tr><td>PathInfo</td><td><%=request.getPathInfo()%></td></tr>
        <tr><td>RequestURI</td><td><%=request.getRequestURI()%></td></tr>
        <tr><td>ContextPath</td><td><%=request.getContextPath()%></td></tr>
        <tr><td>ServletPath</td><td><%=request.getServletPath()%></td></tr>
        <tr><td>PathTranslated</td><td><%=request.getPathTranslated()%></td></tr>
        <tr><td>RequestURI</td><td><%=request.getRequestURL().toString()%></td></tr>
        <tr><td>WaffOryginalPath</td><td><%=request.getAttribute(WaffServlet.PATH_ATTRIBUTE_NAME)%></td></tr>
        <tr><td>Device name</td><td><%=request.getSession().getAttribute(WaffServlet.DEVICE_ATTRIBUTE_NAME)%></td></tr>
        <tr><td>Mobile handling</td><td><%=multiswitch.getMobileHandling()%></td></tr>
        <tr><td>Path prefix (mobile handling)</td><td><%=request.getSession().getAttribute(WaffServlet.PATH_PREFIX_ATTRIBUTE_NAME)%></td></tr>
        <tr><td>Current path</td><td><%=currentPath%></td></tr>
        <tr><td>User login</td><td><%=waffuser.getName()%></td></tr>
        <tr><td>User object</td><td><%=waffuser.toString()%></td></tr>
        <tr><td>Error</td><td><%=request.getAttribute(WaffServlet.errArgumentName)%></td></tr>
    </table>
    <%} else {%>
    <a href="multiswitch.do?debugVisible=y">show debug info</a>&nbsp;&vert;
    <%}%>

</td>
</div>
<div id="poweredby">
    <a href="http://code.google.com/p/waff"><img src="<%=applicationprefix%>/resources/waff.png" alt="http://code.google.com/p/waff"></a>
</div>